<%@page import="com.lynn.salary.entity.User_"%>
<%@page import="com.opensymphony.xwork2.util.ValueStack"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.lynn.salary.util.ToolMethod"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
	String rid = ToolMethod.getCharAndNumr(10);
	String rid2 = ToolMethod.getCharAndNumr(10);
%>
<div id="<%=rid %>" style="float:left;   overflow:auto;border-width: 2px;border-style: groove;border-color: rgb(238,244,245); width: 180px;height:460px;margin-top: 15px;margin-left: 10px;padding-left: 5px;padding-top: 5px;">

</div>

<div id="<%=rid2 %>" style="float:left;   overflow:auto;border-width: 2px;border-style: groove;border-color: rgb(238,244,245); width: 520px;height:460px;margin-top: 15px;margin-left: 10px;padding-left: 5px;padding-top: 5px;">
	
</div>

<script>
var addEmpLis = function () {
	lynnAddLis(empClick);
}
var empClick = function (type,objid,empname) {
	if(type == "dep") return;
	$.ajax({
		  url: "<%=basePath%>employee!empRoleAssign.do?empId="+objid+"&empName="+empname
		}).done(function ( data ) {
			$("#<%=rid2 %>").html(data);
		});
}

var showEmpTree = function (cb) {
	$.ajax({
		  url: "<%=basePath%>emp!showTree.do"
		}).done(function ( data ) {
			$("#<%=rid %>").html(data);
			lynnInitTree();
			if(typeof cb != "undefined")
			cb();
		});
}
showEmpTree(addEmpLis);

</script>